﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="KefuMessage.aspx.cs" Inherits="CSM.Views.Kefu.KefuMessage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>

<script type="text/javascript" src="../../Js/jquery-1.4.3.min.js"></script>
<script src="../../Js/common.js" type="text/javascript"></script>
<script src="../../Js/jquery.autocomplete.min.js" type="text/javascript"></script> 
<script type="text/javascript" src="../../Js/thickbox.js"></script>
<script type="text/javascript" src="../../Js/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="../../Js/jquery.fancybox-1.3.4.js"></script>
<link href="../../App_Themes/Default_1/jquery.autocomplete.css" type="text/css" rel="stylesheet"/> 
<link rel="stylesheet" href="../../App_Themes/Default_1/thickbox.css" type="text/css" media="screen" />
	<link rel="stylesheet" type="text/css" href="../../App_Themes/Default_1/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
<script language="javascript" type="text/javascript">
    function ShowThickBox_aspx(url,id,title) {
        var dir=url;
        var uid=id;
        imgLoader = new Image();
        imgLoader.src = tb_pathToImage;
        window.tb_show(title, dir + "?orderid=" + uid + "&height=400&width=450", "");
        
        
    };
    function showfancy() {
        $("a").fancybox();
    };
    function Addhtml() {
    var myDate = new Date();     
        var str = $("#TextBox_Message").html();
        var newstr = $("#TextBox_New").val();
        var sess = $("#Label1_UserID").html();
        var temp = sess + " " + myDate.toLocaleString().replace("年", "/").replace("月", "/").replace("日", "/") + "</br>" + newstr + "</br>";
        newstr = str + temp;
        $("#TextBox_Message").html(newstr);
        $("#TextBox_New").val("");

        
    };
    function ShowThickBox_div(b, a) {
        var div = a;
        var title = b;
        imgLoader = new Image(); // preload image
        imgLoader.src = tb_pathToImage;
        window.tb_show(title, "#TB_inline?height=400&width=400&inlineId=" + div, "");
        Togglediv();
    };
    function Update() {
        var id = $("#Label_ID").html();
        var message = $("#TextBox_New").val();
        var url = "../../ashx/Kefu_SaveMessage.ashx?id=" + id+"&message="+escape(message);
        var fnCallBack = function(oResult) {
            if (oResult == "yes") {
                Addhtml();
            }
        }
        $.post(url, fnCallBack, "html");
    };
    function Togglediv() {
        $("#FormDiv").toggle();
    }
    function ShowThickBox_div_OrderDetail(b, a) {
        var div = a;
        var title = b;
        imgLoader = new Image(); // preload image
        imgLoader.src = tb_pathToImage;
        window.tb_show(title, "#TB_inline?height=300&width=600&inlineId=" + div, "");
    };
    function closewind() { window.tb_remove(); };
    function fade() { $("#divResult").hide(); };
    
</script> 
    <style type="text/css">
    </style>
</head>
<body class = "CommonPage_Body">
    <form id="form1" runat="server">


        <table >

            <tr>
                <td colspan="3" >
                
                </td>
                <td >
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:Panel ID="Panel_Gridlist" runat="server">
                        <asp:Label ID="Label_ShopId" runat="server" SkinID="Label" Text="店铺："></asp:Label>
            <asp:DropDownList ID="DropDownList_ShopId" runat="server"></asp:DropDownList>
            <asp:TextBox ID="txtOrder" runat="server"></asp:TextBox>
                        <asp:Button ID="Button_Browse" runat="server" Text="查询" SkinID="Button" OnClick="Button_Browse_Click"  />
                        <br>
                        <br>
                        <asp:Panel ID="Panel_Browse" runat="server" Visible="False">
            <asp:LinkButton ID="LinkButton_First" runat="server" CommandArgument="First" OnClick="MyClick"><img src = "../../App_Themes/Default_1/Images/Page_First.gif" class = "Page_First"alt = "首页" /></asp:LinkButton>
            <asp:LinkButton ID="LinkButton_Prev" runat="server" CommandArgument="Prev" OnClick="MyClick"><img  src = "../../App_Themes/Default_1/Images/Page_Prev.gif" class = "Page_Prev"  alt = "上页"/></asp:LinkButton>
            <asp:LinkButton ID="LinkButton_Next" runat="server" CommandArgument="Next" OnClick="MyClick"><img  src = "../../App_Themes/Default_1/Images/Page_Next.gif"  class = "Page_Next"  alt = "下页"/></asp:LinkButton>
            <asp:LinkButton ID="LinkButton_Last" runat="server" CommandArgument="Last" OnClick="MyClick"><img   src = "../../App_Themes/Default_1/Images/Page_Last.gif" class = "Page_Last" alt = "末页"/></asp:LinkButton>
            <asp:Label ID="Label_Total" runat="server" SkinID="Label" Text="共："></asp:Label>
            <asp:Label ID="Label_CurrenPageAndTo" runat="server" SkinID="Label" Text="页，当前第 页，转到"></asp:Label>
            <asp:TextBox ID="TextBox_PageIndex" runat="server" Width="26px"></asp:TextBox>
            <asp:Label ID="Label4" runat="server" SkinID="Label" Text="页"></asp:Label>
            <asp:RangeValidator ID="RangeValidator_PageIndex" runat="server" ControlToValidate="TextBox_PageIndex"
                ErrorMessage="*" MaximumValue="10000" MinimumValue="1" Type="Integer"></asp:RangeValidator>
            <asp:Button ID="Button_PageGo" runat="server" CommandArgument="GotoPage" OnClick="MyClick"
                SkinID="Button" Text="GO" />
                        <asp:GridView ID="GridView_Orders" runat="server" AutoGenerateColumns="False" 
                            SkinID="gridview">
                            <Columns>
                                  <asp:BoundField DataField="OrderID" HeaderText="订单编号" ReadOnly="True" 
                                    SortExpression="订单编号" />
                                <asp:BoundField DataField="CustomerID" HeaderText="客户姓名" ReadOnly="True" 
                                    SortExpression="客户姓名" />
                                <asp:BoundField DataField="OrderTime" HeaderText="交易时间" ReadOnly="True" 
                                    SortExpression="交易时间" />
                                     <asp:BoundField DataField="Payment" HeaderText="交易金额" ReadOnly="True" 
                                    SortExpression="交易金额" />
                                <asp:BoundField DataField="AliPayID" HeaderText="买家支付宝" ReadOnly="True" 
                                    SortExpression="买家支付宝" />
                                <asp:BoundField DataField="PostPay" HeaderText="应付邮费" ReadOnly="True" 
                                    SortExpression="应付邮费" />
                                     <asp:BoundField DataField="TotalPay" HeaderText="总金额" ReadOnly="True" 
                                    SortExpression="总金额" />
                                
       <%--                         <asp:BoundField DataField="ReceiveName" HeaderText="收货人姓名" ReadOnly="True" 
                                    SortExpression="收货人姓名" >
                                     <ItemStyle Width="50px" />
                                  </asp:BoundField>
                                     <asp:BoundField DataField="ReceiveAddress" HeaderText="收货地址" ReadOnly="True" 
                                    SortExpression="收货地址" > <ItemStyle Width="50px" />
                                  </asp:BoundField>--%>
                                     <asp:BoundField DataField="MobleNum" HeaderText="联系电话" ReadOnly="True" 
                                    SortExpression="联系电话" > <ItemStyle Width="50px" />
                                  </asp:BoundField>
          <%--                      <asp:BoundField DataField="OrderStatus" HeaderText="订单状态" ReadOnly="True" 
                                    SortExpression="订单状态" />
                                <asp:BoundField DataField="LogisticsID" HeaderText="物流单号" ReadOnly="True" 
                                    SortExpression="物流单号" />--%>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                     <asp:Button ID="Button_Detail" runat="server" 
                                            CommandArgument='<%# Eval("OrderID") %>' oncommand="Button_Detail_Command" 
                                            Text="订单明细"  SkinID ="Button" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                    <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:Button ID="Button_Message" runat="server" 
                                            CommandArgument='<%# Eval("OrderID") %>' oncommand="Button_Message_Command" 
                                            Text="备注信息"  SkinID ="Button" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="Pic" HeaderText="图片" ReadOnly="True" 
                                    SortExpression="图片" HtmlEncode="False"/>
                                  <asp:BoundField DataField="Txt" HeaderText="备注" ReadOnly="True" 
                                    SortExpression="备注" HtmlEncode="False"/>
                            </Columns>
                        </asp:GridView>
            </asp:Panel>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:HiddenField ID="EditFlag" runat="server" Value="0" />
                </td>
                <td>
                    <asp:HiddenField ID="CurrentPage" runat="server" Value="0" />
                </td>
                <td>
                    &nbsp;
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
        <asp:Panel ID="Panel_Edit" runat="server" visible="false">
            <table style="width: 100%;">
                <tr>
                    <td>
                         <asp:Label ID="Label13" runat="server" Text="当前订单："></asp:Label>
                         <asp:Label ID="Label_ID" runat="server" Text="Label"></asp:Label><br />
                         <asp:Label ID="Label15" runat="server" Text="当前客户："></asp:Label>
                         <asp:Label ID="CustomId" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                         <div id="TextBox_Message" runat="server" style="border-style: inset;     min-height: 120px;
                        max-height: 300px;overflow: scroll;margin-left: auto;white-space:normal; word-break:break-all;
                        margin-right: auto;width:400px;height:200px;outline: 0;
                        border: 1px solid #a0b3d6;
                        font-size: 12px;"></div>
 
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="Label6" runat="server" Text="备注信息：" SkinID="Label"></asp:Label>
                                    
                    </td>
                </tr>
                <tr>
                    <td>
                             <asp:TextBox ID="TextBox_New" runat="server" SkinID="TextBox" TextMode="MultiLine" Height="50px" Width="100%"></asp:TextBox>
                            
                    </td>
                </tr>
                <tr>
                    <td>
                                        <asp:Button ID="Button_Save" runat="server"   skinid ="Button" 
                                        Text="提交备注信息"  onclientclick="Update();return false;" />
                                        <asp:Button ID="Button_Picture" runat="server"   skinid ="Button" 
                                        Text="添加图片"  onclientclick="Togglediv();return false;" />
                                        <asp:Button ID="Button_Cancel" runat="server" oncommand="Button_Cancel_Command" 
                                        Text="退出备注" SkinID ="Button"  OnClientClick="tb_remove();"/>
                    </td>
                </tr>
            </table>
            <div class="ManagerForm" id="FormDiv" visible="false">
        <div class="subManager">
            <fieldset>
                <legend>上传图片</legend>
                <table class="table1" cellspacing="0" cellpadding="8" width="100%" align="center">
                    <tbody>
                        <tr>
                            <td>
                                <table cellpadding="0" cellspacing="0" border="0" id="imgTable">
                                    <tr>
                                        <td colspan="2" class="tdClass">
                                            <asp:Button ID="SubUpload" runat="server" Text="批量上传" SkinID="Button" OnClientClick="TSubmitUploadImageFile();return false;"/>  
                                            <asp:Button ID="CancelUpload" runat="server" Text="减行" SkinID="Button" OnClientClick="TDeleteFileUpload();return false;"/>  
                                            <asp:Button ID="AddUpload" runat="server" Text="增行" SkinID="Button" OnClientClick="TAddFileUpload();return false;" ToolTip="增加一个图片文件路径" />  
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="tdClass">
                                            图片1：
                                        </td>
                                        <td class="tdClass">
                                            <input name="查询" size="30" id="uploadImg1" type="file" />
                                            <span id="uploadImgState1"></span>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
        </div>
    </div>
  
                    </asp:Panel>
    <asp:Panel ID="Panel_OrderDetail" runat="server" Visible="False">
        <table style="width: 100%;">
            <tr>
                <td>
              
                    <asp:Label ID="Label7" runat="server" Text="订单编号" SkinID ="Label" ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox_OrderId" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                <td>
               
                    <asp:Label ID="Label8" runat="server" Text="买家应付款" SkinID ="Label" ></asp:Label>
                </td>
                <td>
                
                    <asp:TextBox ID="TextBox_Payment" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="Label9" runat="server" SkinID="Label" Text="订单状态"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox_OrderStatus" runat="server" SkinID="TextBox"></asp:TextBox>
                </td>
            </tr>
             <tr>
                <td>
               
                    <asp:Label ID="Label1" runat="server" Text="支付宝账号" SkinID ="Label" ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox_AliPay" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                <td>
                  
                    <asp:Label ID="Label2" runat="server" Text="应付邮费" SkinID ="Label" ></asp:Label>
                </td>
                <td>
              
                    <asp:TextBox ID="TextBox_PostPay" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                 <td>
                     <asp:Label ID="Label14" runat="server" SkinID="Label" Text="买家会员名"></asp:Label>
                 </td>
                 <td>
                     <asp:TextBox ID="TextBox_CustomerId" runat="server" SkinID="TextBox"></asp:TextBox>
                 </td>
            </tr>
             <tr>
                <td>
                  
                    <asp:Label ID="Label3" runat="server" Text="买家会员名" SkinID ="Label" ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox5" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                <td>
                  
                    <asp:Label ID="Label5" runat="server" Text="总金额" SkinID ="Label" ></asp:Label>
                </td>
                <td>
                   
                    <asp:TextBox ID="TextBox_TotalPay" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>

            </tr>
               <tr>
                <td>
                  
                    <asp:Label ID="Label10" runat="server" SkinID="Label" Text="运送方式"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox_DeliveryStyle" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                <td>
                   
                    <asp:Label ID="Label16" runat="server" SkinID="Label" Text="联系方式"></asp:Label>
                </td>
                <td>
                  
                    <asp:TextBox ID="TextBox_MobleNum" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                   <td>
                       &nbsp;</td>
                   <td>
                       &nbsp;</td>
            </tr>
               <tr>
                <td>
                 
                    <asp:Label ID="Label11" runat="server" Text="收货人姓名" SkinID ="Label" ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBox_ReceiveName" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
                <td>
                  
                    <asp:Label ID="Label12" runat="server" Text="收货地址" SkinID ="Label" ></asp:Label>
                </td>
                <td colspan="3">
                  
                    <asp:TextBox ID="TextBox_ReceiveAddress" runat="server" SkinID ="TextBox"></asp:TextBox>
                </td>
            </tr>
              <tr>
                <td colspan="6">
                 <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="First" 
                            OnClick="OrderDetailClick" ><img src = "../../App_Themes/Default_1/Images/Page_First.gif" class = "Page_First"alt = "首页" /></asp:LinkButton>                
                        <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument="Prev" 
                            OnClick="OrderDetailClick"><img  src = "../../App_Themes/Default_1/Images/Page_Prev.gif" class = "Page_Prev"  alt = "上页"/></asp:LinkButton>               
                        <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Next" 
                            OnClick="OrderDetailClick"><img  src = "../../App_Themes/Default_1/Images/Page_Next.gif"  class = "Page_Next"  alt = "下页"/></asp:LinkButton>                      
                        <asp:LinkButton ID="LinkButton5" runat="server" CommandArgument="Last" 
                            OnClick="OrderDetailClick"><img   src = "../../App_Themes/Default_1/Images/Page_Last.gif" class = "Page_Last" alt = "末页"/></asp:LinkButton>
                        <asp:Label ID="Label_OrderDetail_Total" runat="server" SkinID="Label" Text="共："></asp:Label>
                        <asp:Label ID="Label_OrderDetail_ToPage" runat="server" SkinID="Label" 
                            Text="页，当前第 页，转到"></asp:Label>
                        <asp:TextBox ID="TextBox1" runat="server" Width="26px"></asp:TextBox>
                        <asp:Label ID="Label20" runat="server" SkinID="Label" Text="页"></asp:Label>
                        <asp:RangeValidator ID="RangeValidator1" runat="server" 
                            ControlToValidate="TextBox_PageIndex" ErrorMessage="*" MaximumValue="10000" 
                            MinimumValue="1" Type="Integer"></asp:RangeValidator>
                        <asp:Button ID="Button1" runat="server" CommandArgument="GotoPage" 
                            OnClick="OrderDetailClick" skinid="Button" Text="GO" />
                    <asp:GridView ID="GridView_OrderDetailList" runat="server" SkinID="gridview" 
                        AutoGenerateColumns="False">
                        <Columns>
                            <asp:BoundField DataField="ProductID" HeaderText="商品编码" />
                            <asp:BoundField DataField="ProductName" HeaderText="商品名称" />
                            <asp:BoundField DataField="Number" HeaderText="数量" />
                            <asp:BoundField DataField="Price" HeaderText="单价" />
                            <asp:BoundField DataField="SumMoney" HeaderText="总价" />
                        </Columns>
                    </asp:GridView>    </td>
            </tr>
             <tr>
                <td colspan="6">
                   <asp:Button ID="Button_Detail_Cancel" runat="server" oncommand="Button_Detail_Cancel_Command" 
                                        Text="关闭" SkinID ="Button"  OnClientClick="tb_remove();"/>  <asp:HiddenField ID="HiddenField_CurrentPage_OrderDetail" runat="server" Value="0" /> 
                    <asp:HiddenField ID="HiddenField_CurrentPage_OrderDetailId" runat="server" 
                        Value="0" />
                 </td>
            </tr>
        </table>
    </asp:Panel>    
<div id = "MyThickBox"></div>
    </form>
</body>
</html>
